/*! \file VertexSorter.hpp */

#ifndef VERTEXSORTER_HPP_INCLUDED
#define VERTEXSORTER_HPP_INCLUDED

#include "Graph.hpp"


/**
 * Defines a simple vertex sorter object for sorting the vertices in a graph.
*/
    struct VertexSorter
    {
        VertexSorter( const Graph& G ) : m_G(&G) {}
        bool operator() (const Vertex& i,const Vertex& j) const
        {
            return (boost::get(boost::vertex_name, *m_G, i) < boost::get(boost::vertex_name, *m_G, j));
        }


    private:
        const Graph* m_G;
    };

#endif // VERTEXSORTER_HPP_INCLUDED
